import { http } from "../utils/index";
import type { CourseCommentsType } from "./type";

// 1、获取评论列表  /api/edu/comment/{page}/{limit}
export const reqGetCommentList = (
  page: number,
  limit: number,
  courseId: string
) => {
  return http.get<CourseCommentsType>(`/api/edu/comment/${page}/${limit}`, {
    courseId,
  });
};

// 2、发布评论  /api/edu/comment/auth/save
export const reqPostComment = (content:string,courseId:string,teacherId:string) => {
  return http.post(`/api/edu/comment/auth/save`,{
    content,
    courseId,
    teacherId
  })
}
